package com.twu.biblioteca;

import java.io.*;
import java.util.ArrayList;
import java.util.List;

public class BibliotecaApp {

    public static void main(String[] args) throws IOException {

        ArrayList<String> bookList = new ArrayList<String>();
        bookList.add("Satantango");
        bookList.add("The Melancholy of Resistance");
        bookList.add("Animalinside");
        bookList.add("Destruction and Sorrow beneath the Heavens");

        Library library = new Library(System.out, bookList);
        UserInputReader userInputReader =  new UserInputReader(new BufferedReader(
                new InputStreamReader(System.in)));

        List<Movie> movieList = new ArrayList<Movie>();
        movieList.add(new Movie("Seven Samurai", "1954", "Akira Kurosawa", "9"));
        movieList.add(new Movie("Crash", "2004", "Paul Haggis", "8"));
        movieList.add(new Movie("The Life Aquatic", "2004", "Wes Anderson", "8"));
        movieList.add(new Movie("Mean Girls", "2004", "Mark Waters", "7"));
        movieList.add(new Movie("Princess Mononoke", "1997", "Hayao Miyazaki", "9"));
        movieList.add(new Movie("Apocalypse Now", "1979", "F. F. Coppola", "7"));
        movieList.add(new Movie("The Room", "2003", "Tommy Wiseau", "10"));
        movieList.add(new Movie("The Village", "2004", "M. N. Shyamalan", "7"));
        movieList.add(new Movie("The Thing", "1982", "John Carpenter", "6"));
        movieList.add(new Movie("El Orfanato", "2007", "J.A. Bayona", "9"));
        movieList.add(new Movie("Dumb and Dumber", "1994", "Peter Farrelly", "7"));
        movieList.add(new Movie("27 Dresses", "2008", "Anne Fletcher", "7"));
        movieList.add(new Movie("Rear Window", "1954", "Alfred Hitchcock", "9"));
        movieList.add(new Movie("Valentin", "2002", "Alejandro Agresti", "9"));
        movieList.add(new Movie("You Only Live Twice", "1967", "Lewis Gilbert", "6"));
        MovieCollection movieCollection = new MovieCollection(movieList, System.out, userInputReader);
        List<User> users = new ArrayList<User>();
        LibraryPatrons libraryPatrons = new LibraryPatrons(System.out, users, userInputReader);

        Biblioteca biblioteca = new Biblioteca(userInputReader, System.out, library, movieCollection, libraryPatrons);

        biblioteca.run();
    }
}
